﻿using System;

namespace Partner.Utility
{
    public class BizException :Exception
    {
        /// <summary>
        /// 业务异常构造函数
        /// </summary>
        /// <param name="message"></param>
        public BizException(string message = null, ErrorCodeEnum? errorCode = null, object errorData = null)
        {
            _bizMessage = message;
            ErrorCode = errorCode;
            ErrorData = errorData;
        }

        private string _bizMessage;
        public override string Message
        {
            get { return _bizMessage;}
        }

        public ErrorCodeEnum? ErrorCode { get; private set; }
        public object ErrorData { get; private set; }
    }
}
